'use strict'
import axios from 'axios'

// let baseUrl = 'http://192.168.1.166:8080'
// let baseUrl = 'http://192.168.1.210/api'
// let baseUrl = 'http://192.168.1.166/api'
// let baseUrl = 'http://vrhcp-dev.huimeihealth.com.cn/api'
let baseUrl = 'http://vrhcp.huimeihealth.com.cn/api'

const api = {
  //微信授权
  wechatUserInfo: '/wechatUserInfo/get',
  //发送验证码
  getPhoneCode: '/login/getPhoneCode',
  //校验验证码
  verifyPhoneCode: '/login/verifyPhoneCode',
  //问卷详情
  getQuestionnairePage: '/questionnaire/getQuestionnairePage/',
  //获取session中的手机号
  phone: '/session/get/phone',
  // 获取问卷答题链接
  geturl: '/questionnaire/geturl/',
  //根据ID获取文章信息
  getArticleInfoById: '/article/getArticleInfoById',
  // 获取直播数据
  live_info: '/live/live_info/',
  //获取直播间状态
  live_status: '/live/live_status/',
  // 获取点播视频数据
  info: '/demand/info/',
}

const httpPost = (api, data) => {
  return axios({
    url: baseUrl + api,
    method: 'post',
    data: data,
  })
}

const httpGet = (api) => {
  return axios({
    url: baseUrl + api,
    method: 'get',
  })
}

export {api, httpPost, httpGet}
